#include<bits/stdc++.h>
using namespace std;
#define int long long

char a[105][105];

signed main() {
	int r, c, k;
	cin >> r >> c >> k;
	for (int i = 1; i <= r; i++)
		for (int j = 1; j <= c; j++)
			cin >> a[i][j];

	int ans = 0;
	for (int i = 1; i <= r; i++) {
		for (int j = 1; j <= c; j++) {
			if (a[i][j] != '.')	continue;

			int flag = 0;
			for (int l = 1; l <= k; l++) {
				if (a[i][j + l - 1] != '.') {
					flag = 1;
					break;
				}
			}
			if (!flag)	ans++;

			if (k == 1)	continue;

			flag = 0;
			for (int l = 1; l <= k; l++) {
				if (a[i + l - 1][j] != '.') {
					flag = 1;
					break;
				}
			}
			if (!flag)	ans++;
		}
	}
	cout << ans;
	return 0;
}
